The invention has application in the field of network traffic generators and analyzers. More particularly, the invention is directed to a mechanism to insert information in the payload portion of a packet in a protocol neutral way.
Network traffic generators and analyzers are devices used to provide information for use by network administrators to determine the efficiency of the flow of packets over a network and to determine where network bottlenecks exist or may exist. For example, a network, such as a local area network (LAN) or wide area network (WAN) will have connected at several nodes of the network, a network traffic generator which generates packets, which packets are generated using a predetermined software protocol such as IP, IPX, SPX, ICMP, ARP, or RARP, Appletalk, DECNET or SNA, each of which is defined in an industry standard manner.
The software or data communications protocols noted above are independent of the media access control (MAC) utilized such as Ethernet or Token Ring.
In order to conduct certain analysis of network traffic, it is desirable to have a timestamp associated with each data packet, which timestamp has a value representing the time at which the packet is placed onto the network being tested so that when the packet is received by a receiving unit, the timestamp in the packet can be compared with a timestamp generated when the packet is received. Another piece of information necessary to perform such analysis is a sequence number associated with each packet.
Thus, while having sequence number and timestamp information within the body of a packet is desirable to enable certain types of analysis to be performed, under commonly utilized software protocols, such as those noted above, it is not possible to add timestamps and sequence number information to a packet without changing the value of a checksum which is necessarily calculated prior to the time the timestamp and sequence number can be added to the packet.
Each packet is generated by a computer and includes a network protocol portion and a payload portion. Referring for example to FIG. 2a, the network protocol portion includes network protocol information and the checksum. Referring to FIG. 1, the checksum is a value calculated by computer 11, based upon information contained in the payload portion, specifically fields 1-5 and fields 10-11 shown in FIG. 2a. When a packet is received, receiving unit 17 recalculates the checksum using the data in the payload portion of the packet. The calculated checksum is then compared with the checksum in the network protocol portion. If the two values do not agree, then it is assumed that the packet was transmitted in error and, typically, a request is made to have the packet re-transmitted.
Since the timestamp and sequence number information are added by generator 13 before placing the packet onto network 15, such information must be added to the packet after the checksum has been calculated. However, as noted above, since the checksum that the receiver calculates is calculated using the contents of the entire payload portion, adding a sequence number and timestamp to the payload portion will cause a different checksum to be calculated than the one in the network protocol portion which in turn causes extraneous packets to be transmitted or otherwise adversely impacts the analysis performed based on the transmitted and received packets.
While it is possible to provide sequence number and timestamp information by computer 11, the timestamp provided by computer 11 would not accurately reflect the time at which the packet is actually placed onto the network by generator 13. While mechanisms could be utilized to compensate for the differential between the time a packet is generated by a computer, and the time it is placed onto the network, such mechanisms would introduce some amount of error. While such errors can be tolerated in certain network environments, as networks speeds have increased, the need for more accurate analysis based on accurate timestamp information becomes more important.
U.S. Pat. No. 5,600,632 recognizes the desirability of having a timestamp whose value can be compared with the time a packet is received by a receiving unit, and teaches various mechanisms for ensuring that clocks in transmitting units and receiving units are synchronized. U.S. Pat. No. 5,600,632 also recognizes the need for synchronizing network analyzers so that timestamps applied to packets will be consistent and accurate through the network. See column 7, lines 31-34. However, this patent contains no teachings or suggestions for applying a timestamp by a network traffic generator in a way which ensures that the checksum in the network protocol portion of a packet will compare with the checksum calculated by a receiving unit.